﻿<UserControl x:Class="TS3ServerManager.Controls.ServerModifyControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             x:Name="OwnControl"
             mc:Ignorable="d" 
             d:DesignHeight="320" d:DesignWidth="150">
    <UserControl.Resources>
        <BooleanToVisibilityConverter x:Key="ToVisibility"/>
    </UserControl.Resources>
    <Grid>
        <StackPanel Name="ConnectionInputPanel" Orientation="Vertical">
            <StackPanel Name="NamePanel" Orientation="Vertical" Visibility="{Binding  ElementName=OwnControl ,Path=IsServerNameVisible, Converter={StaticResource ToVisibility}}">
                <Label>Name of the server:*</Label>
                <TextBox Name="NameTextBox" Margin="5,0,5,0"/>
            </StackPanel>
            <Label>Host/IP:*</Label>
            <TextBox Name="HostTextBox" Margin="5,0,5,0"/>
            <Label Margin="0,2,0,0">Query-Port:*</Label>
            <TextBox  Name="QueryPortTextBox" MaxLength="5" Margin="5,0,5,0" />
            <Label Margin="0,2,0,0">Voice-Port:</Label>
            <TextBox  Name="VoicePortTextBox" MaxLength="5" Margin="5,0,5,0" />
            <CheckBox Name="LoginCheckBox" Content="Do login" Margin="5,5,0,0"  />
            <StackPanel Name="ConnectionLoginPanel" Orientation="Vertical" Visibility="{Binding  ElementName=LoginCheckBox ,Path=IsChecked, Converter={StaticResource ToVisibility}}">
                <Label Margin="0,2,0,0">Username:</Label>
                <TextBox Name="UsernameTextBox" Margin="5,0,5,0"/>
                <Label Margin="0,2,0,0">Password:</Label>
                <PasswordBox  Name="PasswordTextBox" Margin="5,0,5,0" />
            </StackPanel>
        </StackPanel>
    </Grid>
</UserControl>
